<?php /* Smarty version Smarty-3.0.8, created on 2014-11-03 19:12:44
         compiled from "tpl/js/controller/setting-team-add.js" */ ?>
<?php /*%%SmartyHeaderCode:53475457632c9ffe75-15212216%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '296c375a9c528d14f66460a3a8f5be83756f653f' => 
    array (
      0 => 'tpl/js/controller/setting-team-add.js',
      1 => 1414455074,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '53475457632c9ffe75-15212216',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
      //添加团队
      App.controller('setting-team-add', function (page) {
        $(page).find("a.ptime-login-button").on("tap",function(){
          var team_name = $('input.team_name').val();
          $.post(url("team","add_team"),{team_name:team_name},function(data){
            if(typeof(data.errmsg) != "undefined"){
              alert(data.errmsg);
            }else{
              App.dialog({title:"添加成功!",okButton: '确定',},function (ok) {
                if(ok){
                  App.back("setting-nav");
                }
              });
            }
          },"json");
        });
      });